import request from '@/utils/request'

// 查询排查记录列表
export function listRecord(query) {
  return request({
    url: '/syf/record/list',
    method: 'get',
    params: query
  })
}

// 查询排查记录详细
export function getRecord(id) {
  return request({
    url: '/syf/record/' + id,
    method: 'get'
  })
}

// 新增排查记录
export function addRecord(data) {
  return request({
    url: '/syf/record',
    method: 'post',
    data: data
  })
}

// 修改排查记录
export function updateRecord(data) {
  return request({
    url: '/syf/record',
    method: 'put',
    data: data
  })
}

// 排查
export function check(data) {
  return request({
    url: '/syf/record/check',
    method: 'put',
    data: data
  })
}

// 无隐患
export function normalById(data) {
  return request({
    url: '/syf/record/normal',
    method: 'put',
    data: data
  })
}

// 回退
export function backById(id) {
  return request({
    url: '/syf/record/back/' + id,
    method: 'put'
  })
}

// 隐患确认
export function confirmById(id) {
  return request({
    url: '/syf/record/confirm/' + id,
    method: 'put'
  })
}

// 不采纳
export function noAdoptionById(id) {
  return request({
    url: '/syf/record/noAdoption/' + id,
    method: 'put'
  })
}

// 转派
export function forwardById(data) {
  return request({
    url: '/syf/record/forward',
    method: 'put',
    data: data
  })
}

// 删除排查记录
export function delRecord(id) {
  return request({
    url: '/syf/record/' + id,
    method: 'delete'
  })
}
